/**
 * 系统首页（中心介绍、项目介绍、任务介绍）
 */
(function() {
	'use strict';
	require(['orange','jqueryUI'], function(orange) {
		//加载中心介绍
		 orange.loadPage({url: 'system/center.service', target: 'system_center_page', selector: '#sys_center_div', replace: true, success: function(response) {	//	渲染左部导航模块
			  $("#system_center_page").show( "drop",{'direction':'down'},1000);
		 }});
		 
		//中医馆
		 $('#system_tcm').bind('click',function(){
			 orange.loadPage({url: 'system/tcmIndex.service', target: 'index_center', selector: '#tcm_center_div', replace: true, success: function(response) {	//	渲染左部导航模块
					
			 }});
		 });
		//加载人物介绍
		 $('#sys_person_btn').bind('click',function(){
			systemNavbarCss('#sys_person_btn');
			orange.loadPage({url: 'system/person.service', target: 'system_center_page', selector: '#sys_person_div', replace: true, success: function(response) {	//	渲染左部导航模块
				$("#system_center_page").show( "clip",500,function(){
					$("#sys_person_liu").show( "blind",500,function(){
						$("#sys_person_xie").show( "fade",500,function(){
							$("#sys_person_li").show( "fade",{'direction':'right'},500);
						});
					});
				});
			}});
		});
	 	//中心介绍
		 $('#sys_center_btn').bind('click',function(){
			systemNavbarCss('#sys_center_btn');
			orange.loadPage({url: 'system/center.service', target: 'system_center_page', selector: '#sys_center_div', replace: true, success: function(response) {	//	渲染左部导航模块
				  $("#system_center_page").show( "drop",{'direction':'up'},500);
			 }});
		});
		//发展历程
		 $('#sys_develop_btn').bind('click',function(){
			systemNavbarCss('#sys_develop_btn');
			orange.loadPage({url: 'system/develop.service', target: 'system_center_page', selector: '#sys_develop_div', replace: true, success: function(response) {	//	渲染左部导航模块
				$("#system_center_page").show( "blind",{'direction':'up'},500);
			}});
		});
		//科室
		 $('#sys_org_btn').bind('click',function(){
			systemNavbarCss('#sys_org_btn');
			$("#system_center_page").css({'display':'none'});
			orange.loadPage({url: 'system/orgnaization.service', target: 'system_center_page', selector: '#sys_org_div', replace: true, success: function(response) {	//	渲染左部导航模块
				$("#system_center_page").show("clip",500);
			}});
		});
		$('#sys_project_btn').bind('click',function(){
			systemNavbarCss('#sys_project_btn');
			//加载项目介绍
			 orange.loadPage({url: 'system/project.service', target: 'system_center_page', selector: '#sys_project_div', replace: true, success: function(response) {	//	渲染左部导航模块
				 $("#system_center_page").show( "clip",500);
			 }});
		});
		
		function systemNavbarCss(id){
			$("#system_center_page").css({'display':'none'});
			$('.system-card').removeClass('system-card-active');
			$(id).addClass('system-card-active');
		}
		 
	});
	
})();
 